package com.shfl.task.config;


import com.shfl.task.common.ResCodeMessage;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

@Configuration
public class MessageConfig {

    @Bean
    public ResCodeMessage loadMessage() throws Exception {
        ResCodeMessage resCodeMessage = new ResCodeMessage();
        resCodeMessage.setCodeXml(new PathMatchingResourcePatternResolver().getResources("classpath:message-resCode.xml"));
        return resCodeMessage;
    }

}
